﻿<Window x:Class="Probel.Ldoc.Views.ToolBoxes.RenameRecordView"
        
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:t="clr-namespace:Probel.Ldoc.Views.Properties"
        
        Title="{x:Static t:Messages.Title_RenameRecord}" 
        ResizeMode="NoResize" 
        ShowInTaskbar="False" 
        WindowStartupLocation="CenterOwner" 
        WindowStyle="ToolWindow" 
        SizeToContent="Height"
        Width="400">
    <Window.Resources>
        <ResourceDictionary Source="../Themes/Generic.xaml"/>
    </Window.Resources>

    <DockPanel>
        <TextBlock DockPanel.Dock="Top" Margin="5"
                   Text="{x:Static t:Messages.Lbl_RenameRecordTitle}" FontSize="20" 
                   Foreground="{StaticResource TaskDialogMainInstructionBrush}"/>

        <Border Style="{StaticResource ToolBoxBorderStyle}">
            <StackPanel DockPanel.Dock="Bottom"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right">
                <Button Content="{x:Static t:Messages.Btn_Ok}"
                    Style="{DynamicResource ButtonToolBoxStyle}" 
                    Click="Click"
                    Command="{Binding RenameCommand}"
                    IsDefault="True"/>
                <Button Content="{x:Static t:Messages.Btn_Cancel}"
                    Style="{DynamicResource ButtonToolBoxStyle}" 
                    Click="Click"
                    Command="{Binding CancelCommand}"
                    IsCancel="True"/>
            </StackPanel>
        </Border>
        <TextBox DockPanel.Dock="Bottom"
                 Margin="5"
                 Text="{Binding CurrentRecord.Name, UpdateSourceTrigger=PropertyChanged}"/>
    </DockPanel>
</Window>